package com.example.pojo;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;

import java.util.List;
import java.util.Map;

@XStreamAlias("xml")
public class NewsMsg extends BaseMsg  {

    @XStreamAlias("ArticleCount")
    private String articleCount;//图文消息个数
    @XStreamAlias("Articles")
    private List<Article> articles;

    public NewsMsg(Map<String, String> requestMap, List<Article> articles) {
        super(requestMap);
        this.setMsgType("news");
        this.articles = articles;
        this.setArticleCount(this.articles.size()+"");
    }

    public void setArticleCount(String articleCount) {
        this.articleCount = articleCount;
    }

    public void setArticles(List<Article> articles) {
        this.articles = articles;
    }
}
